package com.example.demo.service;

import com.riku.security.core.SeExternalUserService;
import com.riku.security.model.SeUserParam;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by NANC on 2021/6/12.
 */
@Service
public class SeExternalUserServiceImpl implements SeExternalUserService{
    @Override
    public List<SeUserParam> searchUser(String userIdOrName) {
        // 模拟人员查询
        List<SeUserParam> list =new ArrayList<>();
        SeUserParam user1 = new SeUserParam();
        user1.setUserId("1");
        user1.setUserName("陆游");
        SeUserParam user2 = new SeUserParam();
        user2.setUserId("2");
        user2.setUserName("南尘");
        list.add(user1);
        list.add(user2);
        return list;
    }

    @Override
    public SeUserParam getNowUser() {
        // 模拟当前登录人
        SeUserParam user1 = new SeUserParam();
        user1.setUserId("1");
        user1.setUserName("陆游");
        return user1;
    }
}
